#!/bin/bash
script=$(cd `dirname $0`; pwd)"/"$(basename $0)
dt=`date +%s`
datev=`date +%Y%m%d%H%M`
dirname='/dev/shm/omat/hyperthreading/'
if [ ! -d $dirname ]; then
    mkdir -p $dirname
fi
condorpsfilename=$dirname"/ht_"$datev
script=`lscpu| grep '^CPU(s)\|per core' | tr "\n" ";"`
echo $dt" "$script >> $condorpsfilename
find $dirname -cmin +1200 -name "ht_*"  -exec /bin/rm -rf {} \;
